11import * as React from "react" ;
22import { UnorderedList } from "./unordered-list" ;
33
4- const COMPONENT_CLASS = "c-radio-list" ;
4+ // -----------------------------------------------------------------------------------------
5+ // #region Constants
6+ // -----------------------------------------------------------------------------------------
7+
8+ export const RadioListClassName = "c-radio-list" ;
9+ export const RadioListButtonStyleClassName = "-button-style" ;
10+
11+ // #endregion Constants
12+
13+ // -----------------------------------------------------------------------------------------
14+ // #region Interfaces
15+ // -----------------------------------------------------------------------------------------
516
617export interface RadioListProps {
718 items : JSX . Element [ ] ;
819 style ?: RadioListStyles ;
920}
1021
22+ // #endregion Interfaces
23+
24+ // -----------------------------------------------------------------------------------------
25+ // #region Enums
26+ // -----------------------------------------------------------------------------------------
27+
1128export enum RadioListStyles {
1229 Default = "default" ,
1330 Button = "button" ,
1431}
1532
33+ // #endregion Enums
34+
35+ // -----------------------------------------------------------------------------------------
36+ // #region Component
37+ // -----------------------------------------------------------------------------------------
38+
1639const RadioList : React . FunctionComponent < RadioListProps > = ( props ) => {
1740 const { items, style } = props ;
1841
1942 if ( items . length === 0 ) {
2043 return null ;
2144 }
2245
23- const classNames = [ COMPONENT_CLASS ] ;
46+ const classNames = [ RadioListClassName ] ;
2447 if ( style === RadioListStyles . Button ) {
25- classNames . push ( "-button-style" ) ;
48+ classNames . push ( RadioListButtonStyleClassName ) ;
2649 }
2750
2851 return (
@@ -32,4 +55,12 @@ const RadioList: React.FunctionComponent<RadioListProps> = (props) => {
3255 ) ;
3356} ;
3457
58+ // #endregion Component
59+
60+ // -----------------------------------------------------------------------------------------
61+ // #region Exports
62+ // -----------------------------------------------------------------------------------------
63+
3564export { RadioList } ;
65+
66+ // #endregion Exports
0 commit comments