From 730b8d27bef7b4cbbbb54a28d2d96eda67acc037 Mon Sep 17 00:00:00 2001 From: Alex Windett Date: Mon, 13 Feb 2017 12:09:29 +0000 Subject: [PATCH] updating ui components to removing props => props.style. HTML inline style is valid, but should be avoided. --- ui/src/components/avatar/index.js | 4 +--- ui/src/components/checkbox/index.js | 4 +--- ui/src/components/close/index.js | 4 +--- ui/src/components/nav-link/index.js | 13 ++----------- ui/src/components/notification/index.js | 3 +-- ui/src/components/radio/index.js | 7 ++----- ui/src/components/range-slider/index.js | 4 +--- ui/src/components/table-data-table/index.js | 4 +--- ui/src/components/table-simple-table/table.js | 4 +--- ui/src/components/textarea/index.js | 8 ++------ 10 files changed, 13 insertions(+), 42 deletions(-) diff --git a/ui/src/components/avatar/index.js b/ui/src/components/avatar/index.js index 0ec2bff6..b43210a3 100644 --- a/ui/src/components/avatar/index.js +++ b/ui/src/components/avatar/index.js @@ -37,8 +37,6 @@ const Avatar = styled.div` overflow: hidden; position: relative; text-align: center; - - ${props => props.styles} `; module.exports = ({ @@ -79,7 +77,7 @@ module.exports = ({ ); return ( - + {av} ); diff --git a/ui/src/components/checkbox/index.js b/ui/src/components/checkbox/index.js index 6a8aaae5..15b0ce48 100644 --- a/ui/src/components/checkbox/index.js +++ b/ui/src/components/checkbox/index.js @@ -26,8 +26,6 @@ const StyledInput = styled.input` &:disabled + label::after { opacity: 0.3; } - - ${props => props.styles} `; const StyledLabel = styled.label` @@ -94,7 +92,7 @@ const Checkbox = ({ onChange={onChange} readOnly={readOnly} required={required} - styles={style} + style={style} tabIndex={tabIndex} type='checkbox' /> diff --git a/ui/src/components/close/index.js b/ui/src/components/close/index.js index 00e78635..d69296de 100644 --- a/ui/src/components/close/index.js +++ b/ui/src/components/close/index.js @@ -17,8 +17,6 @@ const StyledButton = styled.button` position: absolute; top: ${remcalc(16)}; right: ${remcalc(16)}; - - ${props => props.styles} `; const Close = ({ @@ -28,7 +26,7 @@ const Close = ({ return ( Close props.styles} -`; - const NavLink = ({ activeClassName, activeStyle, @@ -48,7 +39,7 @@ const NavLink = ({ : className; return ( - {newChildren} - + ); }; diff --git a/ui/src/components/notification/index.js b/ui/src/components/notification/index.js index 83b108ca..619b559f 100644 --- a/ui/src/components/notification/index.js +++ b/ui/src/components/notification/index.js @@ -31,7 +31,6 @@ const StyledNotification = styled.div` width: 100%; ${baseBox(0)} - ${props => props.styles} &::before { background-color: ${props => colors[props.type] || colors.brandPrimary} @@ -61,7 +60,7 @@ const Notificaton = ({ return ( { renderClose } diff --git a/ui/src/components/radio/index.js b/ui/src/components/radio/index.js index 642317ca..cf1a77cc 100644 --- a/ui/src/components/radio/index.js +++ b/ui/src/components/radio/index.js @@ -31,10 +31,7 @@ const StyledInput = styled.input` } `; -const StyledLabel = styled.label` - - ${props => props.styles} -`; +const StyledLabel = styled.label``; const StyledContent = styled.div` margin-left: ${remcalc(45)}; @@ -84,7 +81,7 @@ const Radio = ({ }) => { return ( - + props.styles} `; const RangeSlider = ({ @@ -140,7 +138,7 @@ const RangeSlider = ({ ); diff --git a/ui/src/components/table-data-table/index.js b/ui/src/components/table-data-table/index.js index 0989974d..461dd0da 100644 --- a/ui/src/components/table-data-table/index.js +++ b/ui/src/components/table-data-table/index.js @@ -14,8 +14,6 @@ const StyledTitle = styled.h3` const StyledTableWrapper = styled.section` font-family: 'LibreFranklin', sans-serif; font-style: normal; - - ${props => props.styles} `; const Table = ({ @@ -28,7 +26,7 @@ const Table = ({ return ( - + {title} props.styles} `; const Table = ({ @@ -24,7 +22,7 @@ const Table = ({ style, title, }) => ( - + {children} ); diff --git a/ui/src/components/textarea/index.js b/ui/src/components/textarea/index.js index 07f95c36..e8511276 100644 --- a/ui/src/components/textarea/index.js +++ b/ui/src/components/textarea/index.js @@ -22,10 +22,6 @@ const { default: styled } = Styled; -const StyledDiv = styled.div` - ${props => props.styles} -`; - const Label = styled.label` color: ${props => props.error ? colors.alert : colors.fonts.regular} `; @@ -85,7 +81,7 @@ const Textarea = ({ const _error = error ? ({error}) : null; return ( - +
); };