-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from edx/fsheets/status-alert
Create new StatusAlert accessible component. Bump to version 0.1.0.
- Loading branch information
Showing
10 changed files
with
668 additions
and
11 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
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 +1,2 @@ | ||
@import "~bootstrap/scss/_buttons"; | ||
@import "~bootstrap/scss/_close"; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# StatusAlert | ||
|
||
Provides a status alert component with customizable dialog options. StatusAlert has an X button on the right by default (see dismissible option). | ||
|
||
## API | ||
|
||
### `alertType` (string; optional) | ||
`alertType` specifies the type of alert that is being diplayed. It defaults to "warning". See the other available [bootstrap](https://v4-alpha.getbootstrap.com/components/alerts/) options. | ||
|
||
### `className` (string array; optional) | ||
`className` is a string array that defines the classes to be used within the status alert. | ||
|
||
### `dialog` (string or element; required) | ||
`dialog` is a string or an element that is rendered inside of the status alert as the main data. | ||
|
||
### `dismissible` (boolean; optional) | ||
`dismissible` specifies if the status alert will include the dismissible X button to close the alert. It defaults to true. | ||
|
||
### `onClose` (function; conditionally required) | ||
`onClose` is a function that is called on close. It can be used to perform actions upon closing of the status alert, such as restoring focus to the previous logical focusable element. It is only required if `dismissible` is set to `true` and not required if the alert if not `dismissible`. | ||
|
||
### `open` (boolean; optional) | ||
`open` specifies whether the status alert renders open or closed on the initial render. It defaults to false. |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@import "~bootstrap/scss/_alert"; | ||
@import "~bootstrap/scss/_buttons"; | ||
@import "~bootstrap/scss/_close"; | ||
@import "~bootstrap/scss/_transitions.scss"; |
Oops, something went wrong.