diff --git a/example/src/Box/Box.stories.tsx b/example/src/Box/Box.stories.tsx index 3ff93a6..a1ae4fc 100644 --- a/example/src/Box/Box.stories.tsx +++ b/example/src/Box/Box.stories.tsx @@ -9,7 +9,7 @@ export default { pattern: { bg: ['white', 'blue', 'red', 'yellow'], width: [1, '50%', 256], - p: [1, 2, 3], + p: [undefined, 2, 3], }, }, }, diff --git a/src/__snapshots__/index.test.tsx.snap b/src/__snapshots__/index.test.tsx.snap index 5c55bd5..dd9d171 100644 --- a/src/__snapshots__/index.test.tsx.snap +++ b/src/__snapshots__/index.test.tsx.snap @@ -246,7 +246,9 @@ Array [ + > + undefined + @@ -478,7 +480,9 @@ Array [ + > + undefined + diff --git a/src/components/Matrix/Matrix.tsx b/src/components/Matrix/Matrix.tsx index 7196b16..d6671fa 100644 --- a/src/components/Matrix/Matrix.tsx +++ b/src/components/Matrix/Matrix.tsx @@ -27,15 +27,13 @@ export const Matrix: React.FC = ({ component, propsPattern, origina width={3 / 10} > - {Object.entries(props).map(([key, value]) => { - return ( - - - {key}: {value} - + {Object.entries(props).map(([key, value]) => ( + + + {key}: {value ?? 'undefined'} - ); - })} + + ))}