mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-05-06 03:33:02 +03:00
Move stuff belonging to the component to shlink-web-component
This commit is contained in:
parent
cbbb679dfc
commit
d82c0dc75e
204 changed files with 568 additions and 563 deletions
src/shlink-web-component/short-urls/helpers/qr-codes
|
@ -0,0 +1,16 @@
|
|||
import type { FC } from 'react';
|
||||
import { DropdownItem } from 'reactstrap';
|
||||
import { DropdownBtn } from '../../../../utils/DropdownBtn';
|
||||
import type { QrCodeFormat } from '../../../../utils/helpers/qrCodes';
|
||||
|
||||
interface QrFormatDropdownProps {
|
||||
format: QrCodeFormat;
|
||||
setFormat: (format: QrCodeFormat) => void;
|
||||
}
|
||||
|
||||
export const QrFormatDropdown: FC<QrFormatDropdownProps> = ({ format, setFormat }) => (
|
||||
<DropdownBtn text={`Format (${format})`}>
|
||||
<DropdownItem active={format === 'png'} onClick={() => setFormat('png')}>PNG</DropdownItem>
|
||||
<DropdownItem active={format === 'svg'} onClick={() => setFormat('svg')}>SVG</DropdownItem>
|
||||
</DropdownBtn>
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue