-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #463 from newfold-labs/enhance/some-more-fixes-now
Bug Fixes
- Loading branch information
Showing
18 changed files
with
172 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
src/OnboardingSPA/components/OptionWithHeadingSubHeading/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import classNames from 'classnames'; | ||
import { memo } from '@wordpress/element'; | ||
import { Icon, chevronRight } from '@wordpress/icons'; | ||
|
||
const OptionWithHeadingSubHeading = ( { | ||
idx, | ||
title, | ||
desc, | ||
isSelected, | ||
callback, | ||
} ) => { | ||
return ( | ||
<div | ||
key={ idx } | ||
role="button" | ||
tabIndex={ 0 } | ||
className={ 'nfd__option_heading_subheading' } | ||
onClick={ () => { | ||
if ( callback && typeof callback === 'function' ) { | ||
callback( idx + 1 ); | ||
} | ||
} } | ||
onKeyDown={ () => { | ||
if ( callback && typeof callback === 'function' ) { | ||
callback( idx + 1 ); | ||
} | ||
} } | ||
> | ||
<div | ||
className={ classNames( | ||
'nfd__option_heading_subheading__wrapper', | ||
isSelected && | ||
'nfd__option_heading_subheading__wrapper--selected' | ||
) } | ||
> | ||
<div className={ 'nfd__option_heading_subheading__left' }> | ||
<div | ||
className={ 'nfd__option_heading_subheading__left_top' } | ||
> | ||
{ title } | ||
</div> | ||
<div | ||
className={ | ||
'nfd__option_heading_subheading__left_bottom' | ||
} | ||
> | ||
{ desc } | ||
</div> | ||
</div> | ||
<Icon | ||
className={ 'nfd__option_heading_subheading__right' } | ||
icon={ chevronRight } | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default memo( OptionWithHeadingSubHeading ); |
47 changes: 47 additions & 0 deletions
47
src/OnboardingSPA/components/OptionWithHeadingSubHeading/stylesheet.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
$background-color: var(--nfd-onboarding-card-background); | ||
|
||
.nfd__option_heading_subheading { | ||
|
||
&__wrapper { | ||
display: flex; | ||
cursor: pointer; | ||
margin: 16px 4px; | ||
align-items: center; | ||
border-radius: 8px; | ||
padding: 16px 12px 16px 12px; | ||
justify-content: space-between; | ||
transition: background-color 400ms ease-in-out; | ||
|
||
&--selected { | ||
background-color: var(--nfd-onboarding-hover); | ||
} | ||
} | ||
|
||
&:not(:last-child) { | ||
border-bottom: 0.5px solid rgba(var(--nfd-onboarding-primary-rgb), 0.3); | ||
} | ||
|
||
&__left_top { | ||
color: var(--nfd-onboarding-primary); | ||
font-size: 15px; | ||
font-weight: 500; | ||
margin-bottom: 7px; | ||
line-height: 24px; | ||
} | ||
|
||
&__left_bottom { | ||
color: rgba(var(--nfd-onboarding-primary-rgb), 0.7); | ||
|
||
font-size: 14px; | ||
font-weight: 300; | ||
} | ||
|
||
&__right { | ||
fill: var(--nfd-onboarding-primary); | ||
transition: all 200ms ease-in-out; | ||
|
||
&:hover { | ||
transform: scale(1.1); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.