-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(DataItem): update DataItem to extend Base, extract Styles (…
…#624) * refactor(DataItem): update DataItem to extend Base, add properties to static properties array * docs(DataItem): update docs to match latest API * feat(DataItem): extract styles to styles.js * fix(DataItem): patch in content in setter instead of update method * feat(DataItem): add updateContent method * fix(DataItem): revert setContent changes to unbreak other DataItem-based components * feat(DataItem): update focus ring and background update methods Co-authored-by: eraute200 <emily_rautenberg@comcast.com>
- Loading branch information
1 parent
f1a15d0
commit b7a3455
Showing
3 changed files
with
101 additions
and
95 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { FocusRing } from '../../elements'; | ||
|
||
export default theme => ({ | ||
background: { | ||
color: theme.palette.background.ghost | ||
}, | ||
radius: theme.border.radius.medium, | ||
focusringType: FocusRing, | ||
focusring: function ({ w, h, radius, color }) { | ||
return { | ||
w, | ||
h, | ||
radius: radius + 2, | ||
color, | ||
size: theme.spacing(0.5), | ||
zIndex: 1 | ||
}; | ||
}, | ||
unfocused: { | ||
scale: () => 1, | ||
focusring: { alpha: 0 } | ||
}, | ||
focused: { | ||
scale: theme.getFocusScale, | ||
focusring: { alpha: 1 } | ||
} | ||
}); |
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