forked from dsmjs/components
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(bar-styling): remove glamorous div from header bars
Replaced styled components with style objects. Applied styles with css prop. re dsmjs#571
- Loading branch information
Showing
8 changed files
with
16 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import React from 'react'; | ||
import glamorous from 'glamorous'; | ||
import styles from '../styles'; | ||
|
||
const DsmJsBarDiv = glamorous.div({ | ||
const dsmJsBarStyles = { | ||
...styles, | ||
background: '#56626B' | ||
}); | ||
}; | ||
|
||
export default function DsmJsBar() { | ||
return <DsmJsBarDiv>dsmJS</DsmJsBarDiv>; | ||
return <div css={dsmJsBarStyles}>dsmJS</div>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
import React from 'react'; | ||
import {string} from 'prop-types'; | ||
import glamorous from 'glamorous'; | ||
import styles from '../styles'; | ||
|
||
const LocationBarDiv = glamorous.div({ | ||
const locationBarStyles = { | ||
...styles, | ||
background: '#F07C6C' | ||
}); | ||
}; | ||
|
||
export default function LocationBar({location}) { | ||
return <LocationBarDiv>{location}</LocationBarDiv>; | ||
return <div css={locationBarStyles}>{location}</div>; | ||
} | ||
|
||
LocationBar.propTypes = {location: string.isRequired}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import React from 'react'; | ||
import glamorous from 'glamorous'; | ||
import styles from '../styles'; | ||
|
||
const RecurrenceBarDiv = glamorous.div({ | ||
const recurrenceBarStyles = { | ||
...styles, | ||
background: '#AD5472' | ||
}); | ||
}; | ||
|
||
export default function RecurrenceBar() { | ||
return <RecurrenceBarDiv>Second Tuesday every month</RecurrenceBarDiv>; | ||
return <div css={recurrenceBarStyles}>Second Tuesday every month</div>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
import React from 'react'; | ||
import {string} from 'prop-types'; | ||
import glamorous from 'glamorous'; | ||
import styles from '../styles'; | ||
|
||
const SponsorBarDiv = glamorous.div({ | ||
const sponsorBarStyles = { | ||
...styles, | ||
background: '#6C9380' | ||
}); | ||
}; | ||
|
||
export default function SponsorBar({sponsor}) { | ||
return <SponsorBarDiv>{sponsor}</SponsorBarDiv>; | ||
return <div css={sponsorBarStyles}>{sponsor}</div>; | ||
} | ||
|
||
SponsorBar.propTypes = {sponsor: string.isRequired}; |