TrustPilot
TrustPilot is a molecule that uses our Trustpilot AppΒ to display a sentence and Trustpilot review star count, alongwith their logo. This will work for all OE entities that are currently live on Trustpilot.
Basic Usage
import { TrustPilot } from '@krakentech/coral-molecules';
<TrustPilot />Properties
businessAcronym
Use the businessAcronym prop to specify the entity you want to display the Trustpilot review for.
<TrustPilot businessAcronym="oede" />caption
Use the caption prop to provide a custom caption. This prop returns the day, month and year of the last time the Trustpilot review data was updated.
<TrustPilot
caption={({ day, month, year }) =>
`A custom caption with variables: ${day}-${month}-${year}`
}
/>message
Use the message prop to provide a custom message. This prop returns the stars and reviews count to use inside your custom message.
<TrustPilot
message={({ stars, trustScore, reviews }) =>
`A custom message with variables. Stars: ${stars}, trustScore: ${trustScore}, reviews: ${reviews}`
}
/>Sub-components
Itβs possible to use both the Trustpilot Logo and the Stars in insolation. This is useful if you want to use either of them in a different layout or context.
Visit the useTrustPilot hook documentation for further customisation options.
<Stack alignItems="center" flexDirection="column">
<TrustPilotLogo width={200} />
<TrustPilotStars stars={4.5} />
</Stack>