This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Toggle Button example and Accessibility fix
- Loading branch information
1 parent
0d0fe3c
commit 9736a46
Showing
8 changed files
with
156 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 44 additions & 5 deletions
49
...s/terra-core-docs/src/terra-dev-site/doc/toggle-button/example/IsIconOnlyToggleButton.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,49 @@ | ||
import React from 'react'; | ||
import ToggleButton from 'terra-toggle-button'; | ||
|
||
const IconOnly = () => ( | ||
<ToggleButton isIconOnly closedButtonText="Icon Only ToggleButton"> | ||
<p>Cerner has been a pioneer in healthcare technology since 1979 and is well positioned to provide our clients with the stability and vision they need from their technology provider. With cumulative research and development spend exceeding $6.6 billion, Cerner will continue to deliver award-winning solutions for the now and the next.</p> | ||
</ToggleButton> | ||
); | ||
const IconOnly = () => { | ||
const [isButtonOn, setButtonOn] = React.useState(false); | ||
|
||
const handleButtonClick = () => { | ||
setButtonOn(!isButtonOn); | ||
}; | ||
|
||
const handleBookAppointmentClick = () => { | ||
|
||
console.log('Booking an appointment...'); | ||
}; | ||
|
||
const handleContactClick = () => { | ||
|
||
console.log('Contacting us...'); | ||
}; | ||
|
||
return ( | ||
<ToggleButton | ||
isIconOnly | ||
closedButtonText={isButtonOn ? 'Icon Only ToggleButton (ON)' : 'Icon Only ToggleButton (OFF)'} | ||
onToggle={handleButtonClick} | ||
> | ||
<h2>Welcome to Our Clinic!</h2> | ||
<p> | ||
At our clinic, we provide exceptional healthcare services for patients of all ages. Our team of experienced doctors and medical staff is dedicated to ensuring your well-being and delivering personalized care. | ||
</p> | ||
<p> | ||
We offer a wide range of medical specialties, including cardiology, pediatrics, dermatology, orthopedics, and more. Our state-of-the-art facilities are equipped with the latest medical technologies to provide accurate diagnoses and effective treatments. | ||
</p> | ||
<p> | ||
Whether you need a routine check-up, have a specific health concern, or require ongoing care, our compassionate healthcare professionals are here to support you every step of the way. We prioritize patient satisfaction and strive to create a comfortable and nurturing environment for everyone who walks through our doors. | ||
</p> | ||
<div style={{ textAlign: 'center', marginTop: '20px' }}> | ||
<button onClick={handleBookAppointmentClick} className="appointment-button"> | ||
Book an Appointment | ||
</button> | ||
<button onClick={handleContactClick} className="contact-button"> | ||
Contact Us | ||
</button> | ||
</div> | ||
</ToggleButton> | ||
); | ||
}; | ||
|
||
export default IconOnly; |
11 changes: 8 additions & 3 deletions
11
...ra-core-docs/src/terra-dev-site/doc/toggle-button/example/IsInitiallyOpenToggleButton.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
import React from 'react'; | ||
import Radio from 'terra-form-radio'; | ||
import ToggleButton from 'terra-toggle-button'; | ||
|
||
const InitiallyToggleButton = () => ( | ||
<ToggleButton closedButtonText="Initally Open ToggleButton" isInitiallyOpen> | ||
<p>With Cerner solutions, you can share and access information among multiple facilities and across the continuum of care. Hospitals, clinics, physician offices, long-term care facilities, satellite clinics – all your locations – become connected. Cerner revenue cycle solutions are intimately integrated into the clinical process to enable the financial, operational and clinical facets of your organization to work together.</p> | ||
</ToggleButton> | ||
<ToggleButton closedButtonText="Patient Consent Form" isInitiallyOpen> | ||
<p>The Patient Consent Form includes a button for patients to provide their consent for medical procedures or treatments. It simplifies the process by allowing patients to indicate their approval or refusal easily. The form captures the consent status, ensuring compliance with legal and ethical requirements. This enhances the healthcare application's ability to manage patient consent accurately, promoting transparency and patient autonomy. | ||
<div> | ||
<Radio id="Yes" labelText="Yes" name="inline-example" isInline /> | ||
<Radio id="No" labelText="No" name="inline-example" isInline /> | ||
</div> | ||
</p> </ToggleButton> | ||
); | ||
|
||
export default InitiallyToggleButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters