Skip to content

Commit

Permalink
center checkmark in radio relatively to radio's dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
kishkoigor committed Mar 26, 2024
1 parent 7ffa111 commit 270c8fb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@airdao/ui-library",
"type": "module",
"version": "1.4.11",
"version": "1.4.12",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"types": "dist/types.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Radio/Radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function Radio({
className = '',
value = '',
name = '',
onChange = (e) => {},
onChange,
}: RadioProps) {
const classNames = [
s.container,
Expand Down
5 changes: 3 additions & 2 deletions src/components/Radio/radio.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@

/* Style the indicator (dot/circle) */
.container .checkmark:after {
top: 8px;
left: 8px;
top: calc(50% - 4px);
left: calc(50% - 4px);
width: 8px;
height: 8px;
border-radius: 50%;
background: white;
position: relative;
}

0 comments on commit 270c8fb

Please sign in to comment.