Skip to content

Commit

Permalink
fix: Radio and Breadcrumb (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
RabbitDoge authored Jan 22, 2021
1 parent 8a3280c commit e98ea32
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/components/radio.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ it("renders correctly", () => {
expect(asFragment()).toMatchInlineSnapshot(`
<DocumentFragment>
<input
class="sc-bdfBwQ eDQPNu"
class="sc-bdfBwQ dsNrbs"
name="radio"
scale="md"
type="radio"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Breadcrumbs/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { space } from "styled-system";
import ChevronRightIcon from "../Svg/Icons/ChevronRight";
import { BreadcrumbsProps } from "./types";

const Separator = styled.li`
const Separator = styled.div`
align-items: center;
color: currentColor;
display: flex;
Expand Down
3 changes: 3 additions & 0 deletions src/components/Radio/Radio.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import styled from "styled-components";
import { space } from "styled-system";
import { RadioProps, scales } from "./types";

const getScale = ({ scale }: RadioProps) => {
Expand Down Expand Up @@ -66,10 +67,12 @@ const Radio = styled.input.attrs({ type: "radio" })<RadioProps>`
cursor: default;
opacity: 0.6;
}
${space}
`;

Radio.defaultProps = {
scale: scales.MD,
m: 0,
};

export default Radio;
4 changes: 3 additions & 1 deletion src/components/Radio/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { SpaceProps } from "styled-system";

export type RadioTheme = {
handleBackground: string;
};
Expand All @@ -9,6 +11,6 @@ export const scales = {

export type Scales = typeof scales[keyof typeof scales];

export interface RadioProps {
export interface RadioProps extends SpaceProps {
scale?: Scales;
}

0 comments on commit e98ea32

Please sign in to comment.