Update Prettier
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
@@ -39,10 +39,8 @@ export const PropsTable = <T extends Record<string, PropData>>({
|
||||
data: T;
|
||||
columns?: ColumnConfig[];
|
||||
}) => {
|
||||
|
||||
if (!data) return null;
|
||||
|
||||
|
||||
const renderCell = (
|
||||
propName: string,
|
||||
propData: PropData,
|
||||
@@ -63,10 +61,9 @@ export const PropsTable = <T extends Record<string, PropData>>({
|
||||
{propData.type === 'number' && <Chip>number</Chip>}
|
||||
{propData.type === 'boolean' && <Chip>boolean</Chip>}
|
||||
{propData.type === 'enum' && enumValues}
|
||||
{propData.type === 'spacing' &&
|
||||
Array.isArray(propData.values) && (
|
||||
<SpacingPopup values={propData.values} />
|
||||
)}
|
||||
{propData.type === 'spacing' && Array.isArray(propData.values) && (
|
||||
<SpacingPopup values={propData.values} />
|
||||
)}
|
||||
{propData.type === 'complex' && propData.complexType && (
|
||||
<TypePopup
|
||||
complexType={propData.complexType}
|
||||
|
||||
@@ -22,8 +22,12 @@ export const SpacingGroupRow = ({
|
||||
const [isExpanded, setIsExpanded] = useState(false);
|
||||
|
||||
// Separate padding and margin props
|
||||
const paddingProps = spacingGroup.props.filter(prop => prop.name.startsWith('p'));
|
||||
const marginProps = spacingGroup.props.filter(prop => prop.name.startsWith('m'));
|
||||
const paddingProps = spacingGroup.props.filter(prop =>
|
||||
prop.name.startsWith('p'),
|
||||
);
|
||||
const marginProps = spacingGroup.props.filter(prop =>
|
||||
prop.name.startsWith('m'),
|
||||
);
|
||||
|
||||
const renderCell = (columnKey: string) => {
|
||||
switch (columnKey) {
|
||||
@@ -35,7 +39,10 @@ export const SpacingGroupRow = ({
|
||||
aria-expanded={isExpanded}
|
||||
>
|
||||
<span className={styles.propName}>
|
||||
Spacing props <span className={styles.count}>({spacingGroup.props.length})</span>
|
||||
Spacing props{' '}
|
||||
<span className={styles.count}>
|
||||
({spacingGroup.props.length})
|
||||
</span>
|
||||
</span>
|
||||
{isExpanded ? (
|
||||
<RiArrowDownSLine className={styles.icon} size={16} />
|
||||
|
||||
Reference in New Issue
Block a user