Skip to content

Commit

Permalink
fix: Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfp13 committed Aug 16, 2022
1 parent c7df020 commit 55449f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/components/ui/SkuSelector/Selectors.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ import { useState } from 'react'
import { Meta, Canvas, Story, ArgsTable } from '@storybook/addon-docs'

import Selectors from '.'
import {
TokenTable,
TokenRow,
TokenDivider,
} from 'src/../.storybook/components'

<Meta title="Molecules/SkuSelector/Selectors" component={Selectors} />

Expand All @@ -28,7 +23,7 @@ It also handles the general `SkuSelector` behavior, like navigating between SKUs

## Usage

The code snippet below is an example of what `Selectors` props should look like, but remembering that this info comes from the API when the product has available SKU variants.
The code snippet below is an example of what `Selectors` props should look like, but remember that this info comes from the API when the product has available SKU variants.

`import Selectors from 'src/components/ui/SkuSelector'`

Expand Down
4 changes: 3 additions & 1 deletion src/components/ui/SkuSelector/SkuSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ function SkuSelector({
testId = 'store-sku-selector',
activeValue,
}: SkuSelectorProps) {
const radioGroupId = id ? `-${id}` : ''

return (
<div
data-fs-sku-selector
Expand All @@ -86,7 +88,7 @@ function SkuSelector({
)}
<RadioGroup
selectedValue={activeValue}
name={`sku-selector-${variant}${id ? `-${id}` : ''}`}
name={`sku-selector-${variant}${radioGroupId}`}
onChange={(e) => {
onChange?.(e)
}}
Expand Down

0 comments on commit 55449f1

Please sign in to comment.