File size: 1,326 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import { Component } from 'react';
import Card from '..';
import CompactCard from '../compact';

Card.displayName = 'Card';
CompactCard.displayName = 'CompactCard';

class Cards extends Component {
	static displayName = 'Card';

	state = {
		compactCards: false,
	};

	static defaultProps = {
		exampleCode: (
			<div>
				<Card>I am a Card.</Card>
				<Card>I am another Card.</Card>
				<Card className="docs__awesome sauce">I am a third Card with custom classes!</Card>
				<Card href="#cards">I am a linkable Card</Card>
				<Card href="#cards" target="_blank" rel="noopener noreferrer">
					I am a externally linked Card
				</Card>
				<Card
					tagName="button"
					displayAsLink
					onClick={ function () {
						alert( 'Thank you for clicking me!' );
					} }
				>
					I am a clickable button that looks like a link
				</Card>
				<Card highlight="info">I am a Card, highlighted as info</Card>
				<Card highlight="success">I am a Card, highlighted as success</Card>
				<Card highlight="error">I am a Card, highlighted as error</Card>
				<Card highlight="warning">I am a Card, highlighted as warning</Card>
				<CompactCard>I am a CompactCard.</CompactCard>
				<CompactCard>I am another CompactCard.</CompactCard>
			</div>
		),
	};

	render() {
		return this.props.exampleCode;
	}
}

export default Cards;