File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change 11import { Div , type DivProps } from 'honorable'
22import styled from 'styled-components'
33
4- const PropSC = styled . div ( ( { theme } ) => ( {
5- margin : theme . spacing . medium ,
4+ const PropSC = styled . div < { $margin ?: string | number } > (
5+ ( { $margin, theme } ) => ( {
6+ margin : $margin ?? theme . spacing . medium ,
67
7- '.prop-title' : {
8- ...theme . partials . text . caption ,
9- color : theme . colors [ 'text-xlight' ] ,
10- marginBottom : theme . spacing . xxsmall ,
11- } ,
12- } ) )
8+ '.prop-title' : {
9+ ...theme . partials . text . caption ,
10+ color : theme . colors [ 'text-xlight' ] ,
11+ marginBottom : theme . spacing . xxsmall ,
12+ } ,
13+ } )
14+ )
1315
1416export default function Prop ( {
1517 children,
1618 title,
19+ margin,
1720 ...props
1821} : {
1922 title : string
23+ margin ?: string | number
2024} & DivProps ) {
2125 return (
22- < PropSC >
26+ < PropSC $margin = { margin } >
2327 < div className = "prop-title" > { title } </ div >
2428 < Div { ...props } > { children } </ Div >
2529 </ PropSC >
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export default function PropsContainer({
1717 title,
1818 ...props
1919} : {
20- title : string
20+ title ? : string
2121} & DivProps ) {
2222 return (
2323 < PropsContainerSC { ...props } >
You can’t perform that action at this time.
0 commit comments