11import * as React from "react" ;
22import { UnorderedList } from "./unordered-list" ;
33
4- export const COMPONENT_CLASS = "c-radio-list" ;
4+ // -----------------------------------------------------------------------------------------
5+ // #region Constants
6+ // -----------------------------------------------------------------------------------------
7+
8+ export const RadioListClassName = "c-radio-list" ;
59export const RadioListButtonStyleClassName = "-button-style" ;
610
11+ // #endregion Constants
12+
13+ // -----------------------------------------------------------------------------------------
14+ // #region Interfaces
15+ // -----------------------------------------------------------------------------------------
16+
717export interface RadioListProps {
818 items : JSX . Element [ ] ;
919 style ?: RadioListStyles ;
1020}
1121
22+ // #endregion Interfaces
23+
24+ // -----------------------------------------------------------------------------------------
25+ // #region Enums
26+ // -----------------------------------------------------------------------------------------
27+
1228export enum RadioListStyles {
1329 Default = "default" ,
1430 Button = "button" ,
1531}
1632
33+ // #endregion Enums
34+
35+ // -----------------------------------------------------------------------------------------
36+ // #region Component
37+ // -----------------------------------------------------------------------------------------
38+
1739const RadioList : React . FunctionComponent < RadioListProps > = ( props ) => {
1840 const { items, style } = props ;
1941
2042 if ( items . length === 0 ) {
2143 return null ;
2244 }
2345
24- const classNames = [ COMPONENT_CLASS ] ;
46+ const classNames = [ RadioListClassName ] ;
2547 if ( style === RadioListStyles . Button ) {
2648 classNames . push ( RadioListButtonStyleClassName ) ;
2749 }
@@ -33,4 +55,12 @@ const RadioList: React.FunctionComponent<RadioListProps> = (props) => {
3355 ) ;
3456} ;
3557
58+ // #endregion Component
59+
60+ // -----------------------------------------------------------------------------------------
61+ // #region Exports
62+ // -----------------------------------------------------------------------------------------
63+
3664export { RadioList } ;
65+
66+ // #endregion Exports
0 commit comments