Skip to content

Commit 5894f81

Browse files
committed
Replace transparent state by opaque state on Block component
1 parent fbc636c commit 5894f81

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

src/components/atoms/Block/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ import { ifProp } from 'styled-tools'
55

66
const Block = styled.div`
77
font-family: ${font('primary')};
8-
background-color: ${ifProp('transparent', 'transparent', palette(0, true))};
8+
background-color: ${ifProp('opaque', palette(0, true), 'transparent')};
99
color: ${palette({ grayscale: 0 }, 1)};
1010
`
1111

1212
Block.propTypes = {
1313
palette: PropTypes.string,
14-
reverse: PropTypes.bool
14+
reverse: PropTypes.bool,
15+
opaque: PropTypes.bool
1516
}
1617

1718
Block.defaultProps = {

src/components/atoms/Block/index.stories.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ storiesOf('Block', module)
1717
Officia aliqua reprehenderit fugiat occaecat quis non eiusmod.
1818
</Block>
1919
))
20-
.add('palette transparent', () => (
21-
<Block palette="primary" transparent>
20+
.add('palette opaque', () => (
21+
<Block palette="primary" opaque>
2222
Officia aliqua reprehenderit fugiat occaecat quis non eiusmod.
2323
</Block>
2424
))
25-
.add('palette transparent reverse', () => (
26-
<Block palette="primary" transparent reverse>
25+
.add('palette opaque reverse', () => (
26+
<Block palette="primary" opaque reverse>
2727
Officia aliqua reprehenderit fugiat occaecat quis non eiusmod.
2828
</Block>
2929
))

src/components/molecules/Field/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const Field = ({ error, name, invalid, label, type, ...props }) => {
2727
{label && <Label htmlFor={inputProps.id}>{label}</Label>}
2828
{renderInputFirst || <Input {...inputProps} />}
2929
{invalid && error &&
30-
<Error id={`${name}Error`} role="alert" palette="danger" transparent>
30+
<Error id={`${name}Error`} role="alert" palette="danger">
3131
{error}
3232
</Error>
3333
}

src/components/organisms/Header/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const StyledIconLink = styled(IconLink)`
2020

2121
const Header = (props) => {
2222
return (
23-
<Wrapper reverse {...props}>
23+
<Wrapper opaque reverse {...props}>
2424
<StyledIconLink to="/" icon="arc" height={100} />
2525
<PrimaryNavigation reverse />
2626
</Wrapper>

src/components/organisms/Hero/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const StyledIconButton = styled(IconButton)`
4343

4444
const Hero = (props) => {
4545
return (
46-
<Wrapper reverse {...props}>
46+
<Wrapper opaque reverse {...props}>
4747
<Logo />
4848
<Text>
4949
<strong>ARc</strong> is a <IconLink reverse icon="react" href="https://facebook.github.io/react/">React</IconLink> starter kit based on the <IconLink reverse icon="atomic-design" href="http://bradfrost.com/blog/post/atomic-web-design/">Atomic Design</IconLink> methodology. It&apos;s <strong>progressive</strong>, which means that you can start with the basic boilerplate and try the other features when you are comfortable.

0 commit comments

Comments
 (0)