Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Radio group implementation #73

Merged
merged 7 commits into from
Jan 25, 2024
Merged

Conversation

dianafulga
Copy link
Contributor

Implements a radio group component with according styling for the radio buttons

@github-actions github-actions bot added the area: popup Improvements or additions to extension popup label Jan 10, 2024
@raducristianpopa
Copy link
Member

raducristianpopa commented Jan 10, 2024

Extension builds preview

Name Link
Latest commit 16534df
Latest job logs Run #7653821983
BadgeDownload
BadgeDownload
BadgeDownload
BadgeDownload

src/components/radio-group.tsx Outdated Show resolved Hide resolved
src/components/radio-group.tsx Outdated Show resolved Hide resolved
src/components/radio-group.tsx Outdated Show resolved Hide resolved
src/components/radio-group.tsx Outdated Show resolved Hide resolved
const checkedItem = useMemo(() => items.findIndex(item => item.checked), [items])
const [selected, setSelected] = useState(checkedItem)

const handleKeyDown = (event: any) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const handleKeyDown = (event: any) => {
const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get rid of the any.

src/popup/index.css Outdated Show resolved Hide resolved
tailwind.config.ts Outdated Show resolved Hide resolved
@dianafulga dianafulga linked an issue Jan 16, 2024 that may be closed by this pull request
@dianafulga dianafulga changed the title Radio group implementation feat: Radio group implementation Jan 23, 2024
}

useEffect(() => {
const handleKeyPress = (event: any) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto above. Let's type the event.

@dianafulga dianafulga merged commit 8b4ac44 into main Jan 25, 2024
9 checks passed
@dianafulga dianafulga deleted the rp--radio-group-component branch January 25, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: popup Improvements or additions to extension popup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add radio group component
2 participants