File tree Expand file tree Collapse file tree 4 files changed +24
-21
lines changed
documentation/components/content Expand file tree Collapse file tree 4 files changed +24
-21
lines changed Original file line number Diff line number Diff line change @@ -5,21 +5,23 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8- ## UNRELEASED
8+ ## [ 0.8.5 ]
99
1010### Added
1111
1212- ` CheckboxGroup ` and ` RadioGroup ` now support wrapping when ` inline ` is used, and they use the same height as other inputs
13+ - Storybook replaces Playground as preferred development location for components ` yarn storybook `
1314
1415### Changed
1516
1617- ` Icon ` now supports "t-shirt" sizing. (i.e.: ` size="small" ` )
17-
1818- Jest no longer requires artifact build before being run
1919
2020### Fixed
2121
2222- ` Tooltip ` appends ` hover ` class if tooltip is open rather and doesn't replace given ` className ` prop value
23+ - Fixed documentation header
24+ - Fixed a bug in Slider documentation that cause Gatsby to fall over on documentation deployment
2325
2426## [ 0.8.4]
2527
Original file line number Diff line number Diff line change 2626
2727import {
2828 color ,
29- CompatibleHTMLProps ,
3029 SizeXXSmall ,
3130 SizeXSmall ,
3231 SizeSmall ,
3332 SizeMedium ,
3433 SizeLarge ,
34+ CompatibleHTMLProps ,
3535} from '@looker/design-tokens'
3636import React , { forwardRef , Ref } from 'react'
3737import styled from 'styled-components'
@@ -48,7 +48,7 @@ export type IconSize =
4848
4949export interface IconProps
5050 extends Omit < CompatibleHTMLProps < HTMLDivElement > , 'onClick' > ,
51- Omit < SimpleLayoutProps , 'height' | 'width' > {
51+ SimpleLayoutProps {
5252 color ?: string
5353 name : IconNames
5454}
@@ -69,12 +69,16 @@ const IconFactory = forwardRef(
6969
7070IconFactory . displayName = 'IconFactory'
7171
72- export const Icon = styled ( IconFactory ) `
72+ export const Icon = styled ( IconFactory ) . attrs ( ( { size, height, width } ) => ( {
73+ size : ! height && ! width ? size || 'medium' : undefined ,
74+ } ) ) `
7375 ${ simpleLayoutCSS }
7476 ${ color }
7577
7678 align-items: center;
7779 display: inline-flex;
80+ height: ${ ( { height } ) => height } ;
81+ width: ${ ( { width } ) => width } ;
7882`
7983
80- Icon . defaultProps = { size : 'medium' }
84+ // Icon.defaultProps = { size: 'medium' }
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ interface HeaderProps {
3737
3838export const HeaderJsx : FC < HeaderProps > = ( { className } ) => (
3939 < a href = "/" className = { className } >
40- < Flex alignItems = "flex-end " >
40+ < Flex alignItems = "center " >
4141 < Icon
4242 name = "LookerLogo"
4343 alt = "Looker"
@@ -61,14 +61,11 @@ export const HeaderJsx: FC<HeaderProps> = ({ className }) => (
6161)
6262
6363const Header = styled ( HeaderJsx ) `
64- display: flex;
6564 align-items: center;
66- height: ${ ( { height } ) => height } ;
67-
68- padding: 0 ${ ( { theme } ) => theme . space . large }
69- ${ ( { theme } ) => theme . space . xxsmall } ;
70-
65+ display: flex;
7166 border-bottom: 1px solid ${ ( { theme } ) => theme . colors . keyAccent } ;
67+ height: ${ ( { height } ) => height } ;
68+ padding: 0 ${ ( { theme : { space } } ) => `${ space . large } ${ space . xxsmall } ` } ;
7269`
7370
7471const DividerVertical = styled . div < SpaceProps > `
Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ import { IconList } from './demos'
1010` <Icon /> ` component uses the property ` name ` to display the correct icon.
1111
1212``` jsx
13- < Flex justifyContent = " space- around" >
13+ < Space around>
1414 < Icon name= " Check" / >
15- < Icon name= " Favorite" / >
16- < Icon name= " GearOutline" / >
17- < / Flex >
15+ < Icon name= " Favorite" size = " large " / >
16+ < Icon name= " GearOutline" size = " small " / >
17+ < / Space >
1818```
1919
2020## Icon Attributes
@@ -24,7 +24,7 @@ import { IconList } from './demos'
2424` color ` by default, icons inherit the text color of the component they are embedded within. But it can also have it specify as a prop.
2525
2626``` jsx
27- < Flex justifyContent = " space- around" >
27+ < Space around>
2828 < Icon name= " Trash" color= " inform" / >
2929 < Box
3030 color= " critical"
@@ -38,21 +38,21 @@ import { IconList } from './demos'
3838 The text in this Box is red and so is the icon.
3939 < Icon name= " Trash" size= " large" mx= " auto" / >
4040 < / Box>
41- < / Flex >
41+ < / Space >
4242```
4343
4444### size
4545
4646` size ` can be specified by using the size prop. By default the size will be medium.
4747
4848``` jsx
49- < Flex justifyContent = " space- around" alignItems = " flex-end " >
49+ < Space around>
5050 < Icon name= " Beaker" color= " inform" size= " xxsmall" / >
5151 < Icon name= " Beaker" color= " inform" size= " xsmall" / >
5252 < Icon name= " Beaker" color= " inform" size= " small" / >
5353 < Icon name= " Beaker" color= " inform" size= " medium" / >
5454 < Icon name= " Beaker" color= " inform" size= " large" / >
55- < / Flex >
55+ < / Space >
5656```
5757
5858## Icon Library
You can’t perform that action at this time.
0 commit comments