diff --git a/src/core/client/ui/components/Icon/Icon.css b/src/core/client/ui/components/Icon/Icon.css index a34a46bfa..6484d3410 100644 --- a/src/core/client/ui/components/Icon/Icon.css +++ b/src/core/client/ui/components/Icon/Icon.css @@ -1,17 +1,5 @@ -@font-face { - font-family: "Material Icons"; - font-style: normal; - font-weight: 400; - src: local("Material Icons"), local("MaterialIcons-Regular"), - url(material-design-icons/iconfont/MaterialIcons-Regular.woff2) - format("woff2"), - url(material-design-icons/iconfont/MaterialIcons-Regular.woff) - format("woff"), - url(material-design-icons/iconfont/MaterialIcons-Regular.ttf) - format("truetype"); -} - .root { + composes: icon from "talk-ui/shared/icon.css"; font-family: "Material Icons"; speak: none; font-style: normal; diff --git a/src/core/client/ui/components/SelectField/OptGroup.spec.tsx b/src/core/client/ui/components/SelectField/OptGroup.spec.tsx new file mode 100644 index 000000000..0e48da965 --- /dev/null +++ b/src/core/client/ui/components/SelectField/OptGroup.spec.tsx @@ -0,0 +1,14 @@ +import React from "react"; +import TestRenderer from "react-test-renderer"; + +import { PropTypesOf } from "talk-ui/types"; +import OptGroup from "./OptGroup"; + +it("renders correctly", () => { + const props: PropTypesOf = { + label: "mamals", + children: , + }; + const renderer = TestRenderer.create(); + expect(renderer.toJSON()).toMatchSnapshot(); +}); diff --git a/src/core/client/ui/components/SelectField/OptGroup.tsx b/src/core/client/ui/components/SelectField/OptGroup.tsx new file mode 100644 index 000000000..1aaeaf837 --- /dev/null +++ b/src/core/client/ui/components/SelectField/OptGroup.tsx @@ -0,0 +1,13 @@ +import React from "react"; +import { StatelessComponent } from "react"; + +export interface OptGroupProps { + label: string; + children?: React.ReactNode; +} + +const OptionGroup: StatelessComponent = props => { + return ; +}; + +export default OptionGroup; diff --git a/src/core/client/ui/components/SelectField/Option.spec.tsx b/src/core/client/ui/components/SelectField/Option.spec.tsx new file mode 100644 index 000000000..8f7e2919b --- /dev/null +++ b/src/core/client/ui/components/SelectField/Option.spec.tsx @@ -0,0 +1,16 @@ +import React from "react"; +import TestRenderer from "react-test-renderer"; + +import { PropTypesOf } from "talk-ui/types"; +import Option from "./Option"; + +it("renders correctly", () => { + const props: PropTypesOf = { + disabled: false, + hidden: false, + value: "apple", + children: "Apple", + }; + const renderer = TestRenderer.create(