prop-types#string JavaScript Examples
The following examples show how to use
prop-types#string.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: types.js From supportal-frontend with MIT License | 6 votes |
VolProspectContactEventType = shape({
id: number,
created_at: string,
// metadata only exists if event is successful
metadata: shape({
status: oneOf(['SPECIFIC_EVENT', ...Object.keys(Successful)]),
}),
result: oneOf(VOL_PROSPECT_CONTACT_EVENT_RESULTS),
vol_prospect_assignment: number,
})
Example #2
Source File: index.js From juggernaut-desktop with MIT License | 6 votes |
messageType = shape({
id: number.isRequired,
conversationId: number.isRequired,
contentType: string.isRequired,
createdAt: number.isRequired,
senderPubkey: string.isRequired,
receiverPubkey: string.isRequired,
content: string.isRequired,
unread: bool.isRequired,
valid: bool.isRequired,
amountMSats: number.isRequired,
feeAmountMSats: number.isRequired,
response: shape({
amountMSats: number.isRequired,
feeAmountMSats: number.isRequired,
createdAt: number.isRequired
})
})
Example #3
Source File: Card.js From wix-style-react with MIT License | 6 votes |
Card.propTypes = {
/** any node to render inside card */
children: node,
/** any node that controls card e.g. a close button */
controls: node,
/** makes the card stretch to max height in a container */
stretchVertically: bool,
/** makes the card's overflow content to be hidden */
hideOverflow: bool,
/** additional css classes */
className: string,
dataHook: string,
};
Example #4
Source File: Calendar.js From react-nice-dates with MIT License | 6 votes |
Calendar.propTypes = {
locale: object.isRequired,
minimumDate: instanceOf(Date),
maximumDate: instanceOf(Date),
modifiers: objectOf(func),
modifiersClassNames: objectOf(string),
month: instanceOf(Date),
onMonthChange: func,
onDayHover: func,
onDayClick: func,
weekdayFormat: string,
touchDragEnabled: bool
}
Example #5
Source File: card.js From what-front with MIT License | 6 votes |
Card.propTypes = {
id: number.isRequired,
title: string,
date: string,
buttonName: string,
iconName: string,
onDetails: func,
onEdit: func,
children: PropTypes.oneOfType([
element,
string,
PropTypes.arrayOf(element),
]),
className: string,
};
Example #6
Source File: Image.js From dnd-builder with MIT License | 6 votes |
ImageElement.propTypes = {
item: shape({
defaultURL: string,
height: oneOfType([
number,
string,
]),
id: string,
opacity: oneOfType([
number,
string,
]),
roundedCorners: oneOfType([
number,
string,
]),
url: string,
width: oneOfType([
number,
string,
]),
}),
itemAccessor: func,
};
Example #7
Source File: commonTypes.js From material-ui-color with MIT License | 6 votes |
color = oneOfType([
shape({
css: shape({
// TODO
}),
value: number,
hex: string,
raw: oneOfType([string, array, number, shape]),
name: string,
alpha: number,
rgb: arrayOf(number),
hsv: arrayOf(number),
hsl: arrayOf(number),
}),
string,
number,
])
Example #8
Source File: Puppeteer.props.js From webrix with Apache License 2.0 | 6 votes |
propTypes = {
puppeteer: {
children: node,
props: shape({}),
namespace: string,
},
break: {
children: node,
props: arrayOf(string),
namespace: string,
},
}
Example #9
Source File: UsernameField.jsx From frontend-app-authn with GNU Affero General Public License v3.0 | 6 votes |
UsernameField.propTypes = {
usernameSuggestions: PropTypes.arrayOf(string),
handleSuggestionClick: PropTypes.func,
handleUsernameSuggestionClose: PropTypes.func,
errorMessage: PropTypes.string,
intl: intlShape.isRequired,
name: PropTypes.string.isRequired,
value: PropTypes.string.isRequired,
};
Example #10
Source File: Kpi.js From covid19japan with MIT License | 6 votes |
Kpi.propTypes = {
id: string,
label: string,
value: string,
diff: string,
caption: string,
chartName: string,
percent: string,
isActive: bool,
};
Example #11
Source File: index.js From study-chain with MIT License | 6 votes |
blockHashType = shape({
blockhash: string,
blocknum: number,
channelname: string,
creatdt: string,
datahash: string,
prehash: string,
txcount: number,
txhash: arrayOf(string)
})
Example #12
Source File: CollectionRow.js From discovery-mobile-ui with MIT License | 6 votes |
CollectionRow.propTypes = {
collection: shape({}).isRequired,
collectionId: string.isRequired,
label: string.isRequired,
navigation: shape({}).isRequired,
selectCollectionAction: func.isRequired,
updateIsAddingNewCollectionAction: func.isRequired,
};
Example #13
Source File: ControlledMenu.js From react-menu with MIT License | 6 votes |
process.env.NODE_ENV !== "production" ? ControlledMenu.propTypes = /*#__PURE__*/_extends({}, rootMenuPropTypes, {
state: /*#__PURE__*/oneOf( /*#__PURE__*/values(MenuStateMap)),
anchorPoint: /*#__PURE__*/exact({
x: number,
y: number
}),
anchorRef: object,
skipOpen: object,
captureFocus: bool,
menuItemFocus: /*#__PURE__*/exact({
position: /*#__PURE__*/oneOfType([string, number]),
alwaysUpdate: bool
}),
onClose: func
}) : void 0;
Example #14
Source File: Button.js From littlelink-server with MIT License | 6 votes |
Button.propType = {
src: string.isRequired,
alt: string.isRequired,
displayName: string.isRequired,
href: string.isRequired,
name: string.isRequired,
order: number.isRequired,
logo: string,
icon: string,
styles: object,
};
Example #15
Source File: Device.js From techno-broadlink with MIT License | 6 votes |
Device.propTypes = {
name: string,
ip: string,
mac: string,
selected: bool,
model: string,
manufacturer: string,
handleClick: func,
disabled: bool,
handleChange: func,
};
Example #16
Source File: types.js From react-native-neomorph-shadows with MIT License | 6 votes |
ShadowARTType = {
width: number.isRequired,
height: number.isRequired,
borderRadius: number,
shadowRadius: number,
shadowOffset: shape({
x: number,
y: number,
}),
shadowOpacity: number,
shadowColor: string,
backgroundColor: string,
}
Example #17
Source File: profile.js From gatsby-theme-intro with MIT License | 6 votes |
ProfileType = {
about: string.isRequired,
budget: shape({
currency: string.isRequired,
default: number.isRequired,
max: number.isRequired,
min: number.isRequired,
}).isRequired,
company: string.isRequired,
focus: string.isRequired,
focus_url: string,
for_hire: bool.isRequired,
image: shape({
childImageSharp: object.isRequired,
publicURL: string.isRequired,
}),
initials: string.isRequired,
location: string.isRequired,
name: string.isRequired,
profession: string.isRequired,
relocation: bool.isRequired,
skills: arrayOf(string).isRequired,
tools: arrayOf(string).isRequired,
}
Example #18
Source File: ToggleTheme.jsx From trashpanda-fe with MIT License | 5 votes |
Toggle.propTypes = {
theme: string.isRequired,
toggleTheme: func.isRequired
};
Example #19
Source File: head.js From next-qrcode with MIT License | 5 votes |
Head.propTypes = {
title: string,
description: string,
keywords: string,
url: string,
ogImage: string
};
Example #20
Source File: types.js From supportal-frontend with MIT License | 5 votes |
UserAuthType = shape({
userId: string.isRequired,
idToken: string.isRequired,
timestamp: string,
authenticated: bool.isRequired,
})
Example #21
Source File: index.js From juggernaut-desktop with MIT License | 5 votes |
walletType = shape({
id: number.isRequired,
host: string,
macaroonPath: string,
tlsCertPath: string,
lndConnect: string
})
Example #22
Source File: head.js From Hacktoberfest-2020 with MIT License | 5 votes |
Head.propTypes = {
title: string,
description: string,
url: string,
ogImage: string
}
Example #23
Source File: Toggle.js From portfolio with MIT License | 5 votes |
Toggle.propTypes = {
theme: string.isRequired,
toggleTheme: func.isRequired,
}
Example #24
Source File: HomeComponent.js From MoviesDaily with MIT License | 5 votes |
HomeComponent.propTypes = {
navigation: PropTypes.object,
type: PropTypes.oneOf(["tv", "movie"]),
data: PropTypes.arrayOf(object),
onRefresh: PropTypes.func,
subTitle: PropTypes.arrayOf(string),
};
Example #25
Source File: Toggler.js From demolab with MIT License | 5 votes |
Toggle.propTypes = {
theme: string.isRequired,
toggleTheme: func.isRequired,
}
Example #26
Source File: Nav.jsx From Lambda with MIT License | 5 votes |
Link.propTypes = {
to: string.isRequired,
};
Example #27
Source File: FilterDropdown.jsx From covid-trials-dashboard with MIT License | 5 votes |
FilterDropdown.propTypes = {
label: string,
filters: arrayOf(string),
handleSelected: func,
selected: arrayOf(string),
}
Example #28
Source File: ButtonLayout.js From wix-style-react with MIT License | 5 votes |
ButtonLayout.propTypes = {
className: string,
active: bool,
children: any,
disabled: bool,
/** The size of the button */
height: oneOf(['x-small', 'small', 'medium', 'large', 'x-large']),
hover: bool,
/** When true the button will match its parent width */
matchParent: bool,
/** The theme of the button */
theme: oneOf([
'transparent',
'fullred',
'fullgreen',
'fullpurple',
'emptyred',
'emptygreen',
'emptybluesecondary',
'emptyblue',
'emptypurple',
'fullblue',
'login',
'emptylogin',
'transparentblue',
'whiteblue',
'whiteblueprimary',
'whitebluesecondary',
'close-standard',
'close-dark',
'close-transparent',
'icon-greybackground',
'icon-standard',
'icon-standardsecondary',
'icon-white',
'icon-whitesecondary',
'no-border',
'dark-no-border',
'outlined',
]),
type: oneOf(['button', 'submit', 'reset']),
};