Skip to content

Commit

Permalink
Update ToggleIconButton
Browse files Browse the repository at this point in the history
  • Loading branch information
hzhu committed Oct 7, 2020
1 parent a5e9f1c commit b050ad7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/buttons/stories/9-ToggleIcon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import React from 'react';
import { Story, Meta } from '@storybook/react';
import { ToggleIconButton } from '@zendeskgarden/react-buttons';
import { Col, Grid, Row } from '@zendeskgarden/react-grid';
import Icon from '@zendeskgarden/svg-icons/src/16/thumbs-up-stroke.svg';
import IconStroke from '@zendeskgarden/svg-icons/src/16/thumbs-up-stroke.svg';
import IconFill from '@zendeskgarden/svg-icons/src/16/thumbs-up-fill.svg';

export default {
title: 'Components/Buttons/ToggleIconButton',
Expand Down Expand Up @@ -42,7 +43,10 @@ export const Default: Story = ({
disabled={disabled}
size={size}
>
<Icon />
<svg>
<IconFill style={{ opacity: isPressed ? 1 : 0 }} />
<IconStroke style={{ opacity: isPressed ? 0 : 1 }} />
</svg>
</ToggleIconButton>
</Col>
</Row>
Expand Down

0 comments on commit b050ad7

Please sign in to comment.