Skip to content

Commit

Permalink
Merge pull request #142 from brainstormforce/uat-feedback-menu
Browse files Browse the repository at this point in the history
Uat feedback radio
  • Loading branch information
vrundakansara authored Oct 16, 2024
2 parents 4dbcc3a + 2c7ce5e commit a505170
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 29 deletions.
2 changes: 1 addition & 1 deletion src/components/cards/widget-blocks.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ const Template1 = () => {
useSwitch={ option.useSwitch }
className="px-2"
badgeItem={ option.bagde }
buttonWrapperClasses="bg-background-primary"
buttonWrapperClasses="bg-background-primary border-0"
/>
) ) }
</RadioButton.Group>
Expand Down
15 changes: 9 additions & 6 deletions src/components/radio-button/radio-button.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,11 @@ const RadioButtonComponent = (
className={ cn(
! inlineIcon && 'space-y-1.5 mt-[2px]',
reversePosition && ( useSwitch ? 'ml-10' : 'ml-4' ),
inlineIcon && 'flex gap-2'
inlineIcon && 'flex gap-2',
inlineIcon && ! label.description && 'items-center'
) }
>
{ icon && <span>{ icon } </span> }
{ icon && <>{ icon }</> }
<div className={ cn( 'space-y-1.5' ) }>
<p
className={ cn(
Expand Down Expand Up @@ -280,13 +281,13 @@ const RadioButtonComponent = (
'inline-flex items-center relative cursor-pointer transition-all duration-300',
!! label && 'items-start justify-between',
minWidth && 'min-w-[180px]',
buttonWrapperClasses,
borderOn &&
'border border-border-subtle border-solid rounded-md shadow-sm hover:ring-2 hover:ring-border-interactive',
borderOn && checkedValue && 'ring-2 ring-border-interactive',
size === 'sm' ? 'px-3 py-3' : 'px-4 py-4',
'pr-12',
isDisabled && 'cursor-not-allowed opacity-40'
isDisabled && 'cursor-not-allowed opacity-40',
buttonWrapperClasses
) }
htmlFor={ radioButtonId }
onClick={ handleLabelClick } // Toggle switch when label is clicked
Expand All @@ -306,10 +307,12 @@ const RadioButtonComponent = (
<div className="absolute mr-0.5 bottom-1.5 right-3">
<Tooltip
arrow
title={ info?.heading }
content={ info?.description }
triggers={ [ 'hover', 'focus' ] }
placement="top"
label={ {
heading: info?.heading,
description: info?.description,
} }
>
<Info
className={ cn(
Expand Down
2 changes: 1 addition & 1 deletion src/templates/dashboard-astra/dashboard-astra.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ export const AstraDashboard = () => {
className="px-2"
badgeItem={ option.badge }
disabled={ option.disabled }
buttonWrapperClasses="bg-background-primary rounded-md shadow-sm"
buttonWrapperClasses="bg-background-primary rounded-md shadow-sm border-0"
/>
)
) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ export const SpectraDashboard = () => {
useSwitch={ option.useSwitch }
className="px-2"
badgeItem={ option.bagde }
buttonWrapperClasses="bg-background-primary"
buttonWrapperClasses="bg-background-primary border-0"
/>
)
) }
Expand Down
28 changes: 14 additions & 14 deletions src/templates/onboarding-backup/onboarding-backup.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const Template = ( args ) => {
borderOn
icon={ <SureEmailIcon /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Email2` }
Expand All @@ -109,7 +109,7 @@ const Template = ( args ) => {
borderOn
icon={ <SureEmailIcon /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Email3` }
Expand All @@ -130,7 +130,7 @@ const Template = ( args ) => {
borderOn
icon={ <SureEmailIcon /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Email4` }
Expand All @@ -143,7 +143,7 @@ const Template = ( args ) => {
borderOn
icon={ <SureEmailIcon /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Email5` }
Expand All @@ -156,7 +156,7 @@ const Template = ( args ) => {
borderOn
icon={ <SureEmailIcon /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Email6` }
Expand All @@ -177,7 +177,7 @@ const Template = ( args ) => {
borderOn
icon={ <SureEmailIcon /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Email7` }
Expand All @@ -190,7 +190,7 @@ const Template = ( args ) => {
borderOn
icon={ <SureEmailIcon /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Email8` }
Expand All @@ -211,7 +211,7 @@ const Template = ( args ) => {
borderOn
icon={ <SureEmailIcon /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Email9` }
Expand All @@ -224,7 +224,7 @@ const Template = ( args ) => {
borderOn
icon={ <SureEmailIcon /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Email11` }
Expand All @@ -237,7 +237,7 @@ const Template = ( args ) => {
borderOn
icon={ <SureEmailIcon /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Email12` }
Expand All @@ -250,7 +250,7 @@ const Template = ( args ) => {
borderOn
icon={ <SureEmailIcon /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Starter64` }
Expand All @@ -263,7 +263,7 @@ const Template = ( args ) => {
borderOn
icon={ <SureEmailIcon /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Email13` }
Expand All @@ -276,7 +276,7 @@ const Template = ( args ) => {
borderOn
icon={ <SureEmailIcon /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Email14` }
Expand All @@ -289,7 +289,7 @@ const Template = ( args ) => {
borderOn
icon={ <SureEmailIcon /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
</RadioButton.Group>
</div>
Expand Down
3 changes: 3 additions & 0 deletions src/templates/onboarding-import/onboarding-import.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,23 @@ const Template = ( args ) => {
heading: `SEOPress`,
} }
borderOn={ true }
buttonWrapperClasses={ 'border-0' }
/>
<RadioButton.Button
value="aioSeo"
label={ {
heading: `AIO SEO`,
} }
borderOn={ true }
buttonWrapperClasses={ 'border-0' }
/>
<RadioButton.Button
value="youstSeo"
label={ {
heading: `Yoast SEO`,
} }
borderOn={ true }
buttonWrapperClasses={ 'border-0' }
/>
</RadioButton.Group>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const Template = ( args ) => {
borderOn
icon={ <PrestoPlayerLogo /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Starter` }
Expand All @@ -119,7 +119,7 @@ const Template = ( args ) => {
borderOn
icon={ <PrestoPlayerLogo /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `SureCart` }
Expand All @@ -141,7 +141,7 @@ const Template = ( args ) => {
borderOn
icon={ <PrestoPlayerLogo /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Presto` }
Expand All @@ -163,7 +163,7 @@ const Template = ( args ) => {
borderOn
icon={ <PrestoPlayerLogo /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Astra2` }
Expand All @@ -185,7 +185,7 @@ const Template = ( args ) => {
borderOn
icon={ <PrestoPlayerLogo /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
<RadioButton.Button
value={ `Starter2` }
Expand All @@ -207,7 +207,7 @@ const Template = ( args ) => {
borderOn
icon={ <PrestoPlayerLogo /> }
onChange={ () => {} }
buttonWrapperClasses="bg-white"
buttonWrapperClasses="bg-white border-0"
/>
</RadioButton.Group>
</div>
Expand Down

0 comments on commit a505170

Please sign in to comment.