From ce89a0b042ba0db1385e3fbe40c93344369f162a Mon Sep 17 00:00:00 2001 From: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> Date: Sat, 16 Jan 2021 22:34:05 +0300 Subject: Rewrites Radios Rewrites radios to be more fitting with the general theme and style, and to be more consistent across browsers. Signed-off-by: Hassan Abouelela <47495861+HassanAbouelela@users.noreply.github.com> --- src/components/InputTypes/Radio.tsx | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/components/InputTypes/Radio.tsx b/src/components/InputTypes/Radio.tsx index be0f60e..3bf13ed 100644 --- a/src/components/InputTypes/Radio.tsx +++ b/src/components/InputTypes/Radio.tsx @@ -1,6 +1,8 @@ /** @jsx jsx */ import { jsx, css } from "@emotion/react"; import React, { ChangeEvent } from "react"; +import colors from "../../colors"; +import { multiSelectInput, hiddenInput } from "../../commonStyles"; interface RadioProps { option: string, @@ -8,10 +10,29 @@ interface RadioProps { handler: (event: ChangeEvent) => void } +const styles = css` + div { + width: 0.7em; + height: 0.75em; + top: 0.18rem; + + border-radius: 50%; + } + + :hover div, :focus-within div { + background-color: lightgray; + } + + input:checked+div { + background-color: ${colors.blurple}; + } +`; + export default function Radio(props: RadioProps): JSX.Element { return ( -