Skip to content

Commit

Permalink
fix: add correct components to example src (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
cg-julian-taylor authored Dec 28, 2022
1 parent e29e11b commit 32838d4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
8 changes: 3 additions & 5 deletions example/src/components/FormCheckboxDemo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { FormCheckbox, FormGroup } from '@capgeminiuk/dcx-react-library';
import { FormCheckbox, CheckboxGroup } from '@capgeminiuk/dcx-react-library';

export const FormCheckboxDemo = () => {
const [value, setValue] = React.useState('');
Expand Down Expand Up @@ -48,9 +48,8 @@ export const FormCheckboxDemo = () => {
disabled={true}
/>
<h2>Group</h2>
<FormGroup
<CheckboxGroup
name="name-of-group"
type="checkbox"
onChange={handleFormChange}
items={[
{
Expand Down Expand Up @@ -133,9 +132,8 @@ export const FormCheckboxDemo = () => {
}}
/>
<h2>Group using string values</h2>
<FormGroup
<CheckboxGroup
name="name-of-group-string"
type="checkbox"
onChange={handleFormChange}
items={['yes', 'no']}
/>
Expand Down
8 changes: 3 additions & 5 deletions example/src/components/FormRadioDemo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { FormRadio, FormGroup } from '@capgeminiuk/dcx-react-library';
import { FormRadio, RadioGroup } from '@capgeminiuk/dcx-react-library';

export const FormRadioDemo = () => {
const [selected, setSelected] = React.useState('single-2');
Expand Down Expand Up @@ -153,10 +153,9 @@ export const FormRadioDemo = () => {
}}
/>
<h4 id="basic-radio-group-tag">Basic Group Radios</h4>
<FormGroup
<RadioGroup
ariaDescribedBy="basic-radio-group-tag"
name="group3"
type="radio"
items={[
{
id: 'radio-1',
Expand Down Expand Up @@ -212,10 +211,9 @@ export const FormRadioDemo = () => {
<h4 id="basic-radio-group-with-string-tag">
Basic Group Radios using string
</h4>
<FormGroup
<RadioGroup
ariaDescribedBy="basic-radio-group-tag"
name="group4"
type="radio"
items={['Option 1', 'Option 2', 'Option 3']}
//@ts-ignore
onChange={handleGroupConditionalChange}
Expand Down
8 changes: 3 additions & 5 deletions example/src/pages/Register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
FormRadio,
FormSelect,
Toggle,
FormGroup,
RadioGroup,
Autocomplete,
FormDate,
ErrorPosition,
Expand Down Expand Up @@ -462,9 +462,8 @@ export const Register = () => {
</div>

<div className="form-group">
<FormGroup
<RadioGroup
name="heard-about"
type="radio"
inputProps={{
className: 'class-name',
}}
Expand Down Expand Up @@ -517,8 +516,7 @@ export const Register = () => {
fieldsetClasses="field-set-class"
hint={{
id: 'heard-about-hint',
text:
'Please select the one closest to where you first heard about us',
text: 'Please select the one closest to where you first heard about us',
className: 'hint-class',
}}
itemsClasses="item-classes"
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './formGroup';
export * from './checkboxGroup';
export * from './radioGroup';
export * from './formInput';
export * from './formRadio';
Expand Down

0 comments on commit 32838d4

Please # to comment.