mirror of
https://github.com/IT4Change/ohmyform-ui.git
synced 2025-12-13 09:45:50 +00:00
- add default page background - add environment list in [doc](doc/environment.md) - combined notificationts to become more versatile - use exported hooks for graphql - links at the bottom for new users - fixes for hide contrib setting - upgrad all packages
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import { Radio } from 'antd'
|
|
import { RadioProps } from 'antd/lib/radio/interface'
|
|
import React from 'react'
|
|
import styled from 'styled-components'
|
|
import { FormPublicDesignFragment } from '../../graphql/fragment/form.public.fragment'
|
|
|
|
interface Props extends RadioProps {
|
|
design: FormPublicDesignFragment
|
|
}
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-assignment
|
|
const Field = styled(Radio)`
|
|
color: ${(props: Props) => props.design.colors.answer};
|
|
border-color: ${(props: Props) => props.design.colors.answer};
|
|
background: none;
|
|
|
|
.ant-radio {
|
|
.ant-radio-inner {
|
|
border-color: ${(props: Props) => props.design.colors.answer};
|
|
|
|
&::after {
|
|
background: ${(props: Props) => props.design.colors.answer};
|
|
}
|
|
}
|
|
|
|
&::after {
|
|
border-color: ${(props: Props) => props.design.colors.answer};
|
|
}
|
|
}
|
|
|
|
.anticon {
|
|
color: ${(props: Props) => props.design.colors.answer};
|
|
}
|
|
`
|
|
|
|
export const StyledRadio: React.FC<Props> = ({ children, ...props }) => {
|
|
return <Field {...props}>{children}</Field>
|
|
}
|