Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@babel/cli": "^7.1.5",
"enzyme": "^3.7.0",
"enzyme-adapter-react-16": "^1.7.0",
"fiori-fundamentals": "^1.3.3",
"fiori-fundamentals": "^1.4.0",
"gh-pages": "^2.0.1",
"jest": "^23.6.0",
"react": "^16.6.3",
Expand Down
61 changes: 52 additions & 9 deletions src/Alert/Alert.Component.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from 'react';
import { Alert } from '../';
import { Alert, Icon } from '../';
import { DocsTile, DocsText, Separator, Header, Description, Import, Properties, Playground } from '../';


export const AlertComponent = () => {
const defaultAlertCode = `<Alert dismissable link="#" linkText="link">Default alert with a </Alert>`;

Expand All @@ -11,10 +10,27 @@ export const AlertComponent = () => {
<p>More information...</p>
</Alert>`;

const errorAlertCode = `<Alert type="error" dismissable link="#" linkText="link">
Error message with a
const errorAlertCode = `<Alert type="error" dismissable>
<Icon glyph="message-error" /> Error Message.
<a href="#" class="fd-link">
Learn More
</a>
</Alert>`;

const sucessAlertCode = `<Alert type="success" dismissable>
<Icon glyph="message-success" /> Message Success.
<a href="#" class="fd-link">
Learn More
</a>
</Alert>`;

const informationAlertCode = `<Alert type="information" dismissable>
<Icon glyph="message-information" /> Information Message.
<a href="#" class="fd-link">
Learn More
</a>
</Alert>`;

return (
<div>
<Header>Alert</Header>
Expand Down Expand Up @@ -53,7 +69,7 @@ export const AlertComponent = () => {
</Description>
<DocsTile>
<Alert dismissable link="#" linkText=" link">
Default alert with a {' '}
Default alert with a{' '}
</Alert>
</DocsTile>
<DocsText>{defaultAlertCode}</DocsText>
Expand Down Expand Up @@ -82,14 +98,41 @@ export const AlertComponent = () => {
rectified the error. The user will need to dismiss the message. Apply type="error".
</Description>
<DocsTile>
<Alert type="error" dismissable link="#" linkText=" link">
Error message with a {' '}
<Alert type="error" dismissable>
<Icon glyph="message-error" /> Error Message.{' '}
<a href="#" class="fd-link">
Learn More
</a>
</Alert>
</DocsTile>
<DocsText>{errorAlertCode}</DocsText>

<Separator />

<h2>Success Alert</h2>
<DocsTile>
<Alert type="success" dismissable>
<Icon glyph="message-success" /> Message Success.{' '}
<a href="#" class="fd-link">
Learn More
</a>
</Alert>
</DocsTile>
<DocsText>{sucessAlertCode}</DocsText>

<Separator />

<h2>Information Alert</h2>
<DocsTile>
<Alert type="information" dismissable>
<Icon glyph="message-information" /> Information Message.{' '}
<a href="#" class="fd-link">
Learn More
</a>
</Alert>
</DocsTile>
<DocsText>{informationAlertCode}</DocsText>

<Separator />

<h2>Playground</h2>
Expand All @@ -99,7 +142,7 @@ export const AlertComponent = () => {
{
attribute: 'type',
typeOfAttribute: 'string',
enum: ['', 'warning', 'error']
enum: ['', 'warning', 'error', 'information', 'success']
},
{
attribute: 'dismissable',
Expand Down
2 changes: 1 addition & 1 deletion src/Alert/Alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class Alert extends Component {
}

Alert.propTypes = {
type: PropTypes.oneOf(['', 'warning', 'error']),
type: PropTypes.oneOf(['', 'warning', 'error', 'success', 'information']),
link: PropTypes.string,
linkText: PropTypes.string,
dismissable: PropTypes.bool
Expand Down
8 changes: 6 additions & 2 deletions src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ $fd-fonts-path: '../node_modules/fiori-fundamentals/dist/fonts/';
background-color: white;
}

.fd-counter--notification {
position: relative;
}

.fd-tile__content {
.fd-badge,
.fd-label,
.fd-status-label,
.fd-token,
.fd-dropdown,
.fd-button-group,
[class*='fd-identifier'],
{
.fd-counter,
[class*='fd-identifier'] {
margin-right: 20px;
}

Expand Down
Loading