Skip to content

Commit

Permalink
fix(dropdown placeholder and onclear): demostrate styledplaceholder a…
Browse files Browse the repository at this point in the history
…nd fix onclear
  • Loading branch information
wmangimelli committed Sep 15, 2020
1 parent c13e01c commit ce237c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Dropdown, { OptionProps } from './Dropdown';
import variants from '../../enums/variants';
import Label from '../Label';
import { colors } from '../../index';
import styled from 'styled-components';

const design = {
type: 'figma',
Expand Down Expand Up @@ -72,12 +73,16 @@ const teaOptions = [
},
];

const StyledPlaceHolder = styled.span`
color: blue;
`;

storiesOf('Dropdown', module)
.addParameters({ component: Dropdown })
.add(
'Basic',
() => {
const [values, setValues] = useState<(string | number)[] | undefined>([cities[0].id]);
const [values, setValues] = useState<(string | number)[] | undefined>();
return (
<>
<Label labelText="City" htmlFor="cities-list">
Expand All @@ -98,6 +103,7 @@ storiesOf('Dropdown', module)
optionsVariant={select('optionsVariant', variants, variants.outline)}
valueVariant={select('valueVariant', variants, variants.text)}
values={values}
StyledPlaceholder={StyledPlaceHolder}
/>
</Label>
</>
Expand Down
1 change: 1 addition & 0 deletions packages/hs-react-ui/src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const ValueIconContainer = styled(Div)`
// TODO: Don't use explicit height here - this div is ending up larger than the icon otherwise
const CloseIconContainer = styled(Div)`
height: 1.125rem;
z-index: 1;
`;

const ValueItem = styled(Div)`
Expand Down

0 comments on commit ce237c5

Please sign in to comment.