Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Commit

Permalink
feat(Grid|Image): move styles to base theme (#1182)
Browse files Browse the repository at this point in the history
* -moved grid and image styles to base theme

* -added circularRadius variable in the image variables

* -removed unused imports

* -updated changelog
  • Loading branch information
mnajdova authored Apr 8, 2019
1 parent 348d06a commit b1ff006
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

### Features
- Add `Reaction` variables to Teams dark and HOC themes @mnajdova ([#1152](https://github.com/stardust-ui/react/pull/1152))
- Move `Grid`'s and `Image`'s styles and variables from Teams to base theme @mnajdova ([#1182](https://github.com/stardust-ui/react/pull/1182))

### Fixes
- Fix the reset of the `highlightedIndex` when search query changes @silviuavram ([#1168](https://github.com/stardust-ui/react/pull/1168))
Expand Down
2 changes: 2 additions & 0 deletions packages/react/src/themes/base/componentStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ export { default as Icon } from './components/Icon/iconStyles'
export { default as Loader } from './components/Loader/loaderStyles'
export { default as ProviderBox } from './components/Provider/providerBoxStyles'
export { default as Text } from './components/Text/textStyles'
export { default as Grid } from './components/Grid/gridStyles'
export { default as Image } from './components/Image/imageStyles'
2 changes: 2 additions & 0 deletions packages/react/src/themes/base/componentVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ export { default as Icon } from './components/Icon/iconVariables'
export { default as Loader } from './components/Loader/loaderVariables'
export { default as ProviderBox } from './components/Provider/providerBoxVariables'
export { default as Text } from './components/Text/textVariables'
export { default as Grid } from './components/Grid/gridVariables'
export { default as Image } from './components/Image/imageVariables'
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { pxToRem } from '../../../../lib'
import { ComponentSlotStylesInput, ICSSInJSStyle } from '../../../types'
import { ImageProps } from '../../../../components/Image/Image'

Expand All @@ -9,7 +8,7 @@ export default {
verticalAlign: 'middle',
width: (props.fluid && '100%') || variables.width,
height: variables.height || 'auto',
...(props.circular && { borderRadius: pxToRem(9999) }),
...(props.circular && { borderRadius: variables.circularRadius }),
...(props.avatar && {
width: (props.fluid && '100%') || variables.avatarSize,
borderRadius: variables.avatarRadius,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export default () => ({
height: undefined,
avatarRadius: pxToRem(9999),
avatarSize: pxToRem(32),
circularRadius: pxToRem(9999),
})
4 changes: 0 additions & 4 deletions packages/react/src/themes/teams/componentStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,8 @@ export { default as FormField } from './components/Form/formFieldStyles'
export { default as Header } from './components/Header/headerStyles'
export { default as HeaderDescription } from './components/Header/headerDescriptionStyles'

export { default as Grid } from './components/Grid/gridStyles'

export { default as Icon } from './components/Icon/iconStyles'

export { default as Image } from './components/Image/imageStyles'

export { default as Input } from './components/Input/inputStyles'

export { default as Label } from './components/Label/labelStyles'
Expand Down
4 changes: 0 additions & 4 deletions packages/react/src/themes/teams/componentVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,11 @@ export {
export { default as Flex } from './components/Flex/flexVariables'
export { default as FlexItem } from './components/Flex/flexItemVariables'

export { default as Grid } from './components/Grid/gridVariables'

export { default as Header } from './components/Header/headerVariables'
export { default as HeaderDescription } from './components/Header/headerDescriptionVariables'

export { default as Icon } from './components/Icon/iconVariables'

export { default as Image } from './components/Image/imageVariables'

export { default as Input } from './components/Input/inputVariables'

export { default as Label } from './components/Label/labelVariables'
Expand Down

0 comments on commit b1ff006

Please sign in to comment.