Skip to content

Commit

Permalink
Change naming
Browse files Browse the repository at this point in the history
fix typos
change prop to toptional
  • Loading branch information
orrgottlieb committed May 29, 2024
1 parent 3f66728 commit 5663e95
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@
cursor: not-allowed;
}

.stretch {
.fullWidth {
flex: 1;
}
6 changes: 3 additions & 3 deletions packages/core/src/components/ButtonGroup/ButtonGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export interface ButtonGroupProps extends VibeComponentProps {
tooltipContainerSelector?: string;
tooltipMoveBy?: MoveBy;
children?: React.ReactNode;
stretch: boolean;
fellWidth?: boolean;
}

const ButtonGroup: VibeComponent<ButtonGroupProps, HTMLDivElement> & {
Expand All @@ -76,7 +76,7 @@ const ButtonGroup: VibeComponent<ButtonGroupProps, HTMLDivElement> & {
tooltipMoveBy,
id,
"data-testid": dataTestId,
stretch = false
fellWidth = false
},
ref
) => {
Expand Down Expand Up @@ -130,7 +130,7 @@ const ButtonGroup: VibeComponent<ButtonGroupProps, HTMLDivElement> & {
[styles.selected]: isSelected,
[styles.disabled]: disabled,
[styles.buttonDisabled]: option.disabled,
[styles.stretch]: stretch
[styles.fellWidth]: fellWidth
})}
activeButtonClassName={styles.activeButton}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ For on and off actions, use the <StorybookLink page="Inputs/Toggle">Toggle</Stor

<Canvas of={ButtonGroupStories.ButtonGroupAsToggle} />

### Stretch Button group
### Full width button group

Use this option in order for the ButtonGroup to fill the entire width of its container

<Canvas of={ButtonGroupStories.StretchedButtonGroup} />
<Canvas of={ButtonGroupStories.FullWidthButtonGroup} />

## Related components

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,11 @@ export const ButtonGroupAsToggle: Story = {
name: "Button group as toggle"
};

export const StretchedButtonGroup: Story = {
export const FullWidthButtonGroup: Story = {
render: () => (
<div style={{ width: "100%" }}>
<ButtonGroup
groupAriaLabel="Stretched Buttong Gfroup"
groupAriaLabel="Full Width Button Group"
stretch
value={1}
options={[
Expand Down

0 comments on commit 5663e95

Please sign in to comment.