Skip to content

Commit 6a26070

Browse files
authored
Merge pull request #15 from creativetimofficial/docs/add-tab-props
docs: add tab components props
2 parents aa10fbc + ae81d7d commit 6a26070

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,79 @@ export default YourComponent;
10341034
Props:
10351035

10361036
```
1037+
TabContainer.defaultProps = {
1038+
color: "pink",
1039+
controlled: false
1040+
};
1041+
1042+
TabContainer.propTypes = {
1043+
// if you want to controll the behavior yourself
1044+
controlled: PropTypes.bool,
1045+
// set the background, border and text color for the tab-link
1046+
color: PropTypes.oneOf([
1047+
"black",
1048+
"white",
1049+
"gray",
1050+
"red",
1051+
"orange",
1052+
"yellow",
1053+
"green",
1054+
"teal",
1055+
"blue",
1056+
"indigo",
1057+
"purple",
1058+
"pink"
1059+
]),
1060+
children: PropTypes.node
1061+
};
1062+
1063+
1064+
TabContent.defaultProps = {
1065+
active: false
1066+
};
1067+
1068+
TabContent.propTypes = {
1069+
show: PropTypes.bool,
1070+
id: PropTypes.string.isRequired,
1071+
children: PropTypes.node
1072+
};
1073+
10371074
1075+
TabItem.defaultProps = {};
1076+
1077+
TabItem.propTypes = {
1078+
children: PropTypes.node
1079+
};
1080+
1081+
1082+
TabLink.defaultProps = {
1083+
disabled: false,
1084+
active: false,
1085+
color: "white"
1086+
};
1087+
1088+
TabLink.propTypes = {
1089+
disabled: PropTypes.bool,
1090+
active: PropTypes.bool,
1091+
// set the background, border and text color for the tab-link
1092+
color: PropTypes.oneOf([
1093+
"black",
1094+
"white",
1095+
"gray",
1096+
"red",
1097+
"orange",
1098+
"yellow",
1099+
"green",
1100+
"teal",
1101+
"blue",
1102+
"indigo",
1103+
"purple",
1104+
"pink"
1105+
]),
1106+
// the tab-content that will be displayed by pressing this tab-link
1107+
target: PropTypes.string.isRequired,
1108+
children: PropTypes.node
1109+
};
10381110
```
10391111

10401112

0 commit comments

Comments
 (0)