aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components/ui/container.tsx
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-10-05 05:59:07 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-10-05 05:59:07 +0800
commita8b01fedb1cbe61daf20dc6e0b62ccd7b1bc9b92 (patch)
tree29b6cc8e65d18f59044d4536d0ba84157efc8c35 /packages/instant/src/components/ui/container.tsx
parent85c34b17aa074e67ed9263094cc0ee75a8f00e60 (diff)
downloaddexon-0x-contracts-a8b01fedb1cbe61daf20dc6e0b62ccd7b1bc9b92.tar
dexon-0x-contracts-a8b01fedb1cbe61daf20dc6e0b62ccd7b1bc9b92.tar.gz
dexon-0x-contracts-a8b01fedb1cbe61daf20dc6e0b62ccd7b1bc9b92.tar.bz2
dexon-0x-contracts-a8b01fedb1cbe61daf20dc6e0b62ccd7b1bc9b92.tar.lz
dexon-0x-contracts-a8b01fedb1cbe61daf20dc6e0b62ccd7b1bc9b92.tar.xz
dexon-0x-contracts-a8b01fedb1cbe61daf20dc6e0b62ccd7b1bc9b92.tar.zst
dexon-0x-contracts-a8b01fedb1cbe61daf20dc6e0b62ccd7b1bc9b92.zip
Improve utilities and try to use them in simple form component
Diffstat (limited to 'packages/instant/src/components/ui/container.tsx')
-rw-r--r--packages/instant/src/components/ui/container.tsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/instant/src/components/ui/container.tsx b/packages/instant/src/components/ui/container.tsx
index f928ed25b..8366d5748 100644
--- a/packages/instant/src/components/ui/container.tsx
+++ b/packages/instant/src/components/ui/container.tsx
@@ -10,13 +10,16 @@ export interface ContainerProps {
right?: string;
bottom?: string;
left?: string;
+ width?: string;
maxWidth?: string;
- margin: string;
+ margin?: string;
marginTop?: string;
marginRight?: string;
marginBottom?: string;
marginLeft?: string;
padding?: string;
+ boxShadow?: string;
+ borderRadius?: string;
className?: string;
backgroundColor?: ColorOption;
}
@@ -32,6 +35,7 @@ export const Container = styled(PlainContainer)`
${props => cssRuleIfExists(props, 'right')}
${props => cssRuleIfExists(props, 'bottom')}
${props => cssRuleIfExists(props, 'left')}
+ ${props => cssRuleIfExists(props, 'width')}
${props => cssRuleIfExists(props, 'max-width')}
${props => cssRuleIfExists(props, 'margin')}
${props => cssRuleIfExists(props, 'margin-top')}
@@ -39,9 +43,13 @@ export const Container = styled(PlainContainer)`
${props => cssRuleIfExists(props, 'margin-bottom')}
${props => cssRuleIfExists(props, 'margin-left')}
${props => cssRuleIfExists(props, 'padding')}
+ ${props => cssRuleIfExists(props, 'box-shadow')}
+ ${props => cssRuleIfExists(props, 'border-radius')}
background-color: ${props => (props.backgroundColor ? props.theme[props.backgroundColor] : 'none')};
`;
Container.defaultProps = {
display: 'inline-block',
};
+
+Container.displayName = 'Container';