UNPKG

react-smartphone

Version:

![Demo](https://github.com/Turutupa/react-smartphone/blob/main/demo.gif)

16 lines 1.26 kB
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; import { jsx as _jsx } from "react/jsx-runtime"; import styled from 'styled-components'; import { phoneSecondaryColor, phoneHeight } from './constants'; var Button = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n height: ", "px;\n width: 7px;\n position: absolute;\n left: -7px;\n top: 100px;\n border-radius: 2px;\n transition: all 0.1s linear;\n\n &:active {\n width: 5px;\n transform: translateX(2px);\n }\n"], ["\n background-color: ", ";\n height: ", "px;\n width: 7px;\n position: absolute;\n left: -7px;\n top: 100px;\n border-radius: 2px;\n transition: all 0.1s linear;\n\n &:active {\n width: 5px;\n transform: translateX(2px);\n }\n"])), function (props) { return props.color ? props.color : phoneSecondaryColor; }, phoneHeight / 6); export default function VolumeButtons(props) { return _jsx(Button, { color: props.color, onClick: props.callback }, void 0); } var templateObject_1; //# sourceMappingURL=VolumeButtons.js.map