import { css } from '@emotion/react'; import { theme } from '@expo/styleguide'; import * as React from 'react'; import TerminalBlock from './TerminalBlock'; import * as Constants from '~/constants/theme'; const STYLES_P = css` line-height: 1.8rem; margin-top: 1.4rem; margin-bottom: 1.4rem; color: ${theme.text.default}; `; const STYLES_BOLD = css` font-family: ${Constants.fonts.demi}; font-weight: 400; text-decoration: none; color: ${theme.link.default}; :hover { text-decoration: underline; } `; const STYLES_LINK = css` text-decoration: none; color: ${theme.link.default}; :hover { text-decoration: underline; } `; type Props = { packageName: string; hideBareInstructions?: boolean; cmd?: string[]; href?: string; }; const getPackageLink = (packageNames: string) => `https://github.com/expo/expo/tree/master/packages/${packageNames.split(' ')[0]}`; const InstallSection: React.FC = ({ packageName, hideBareInstructions = false, cmd = [`expo install ${packageName}`], href = getPackageLink(packageName), }) => (
{hideBareInstructions ? null : (

If you're installing this in a{' '} bare React Native app , you should also follow{' '} these additional installation instructions .

)}
); export default InstallSection;