UNPKG

@mantine/carousel

Version:
1 lines 718 B
{"version":3,"file":"get-chevron-rotation.mjs","names":[],"sources":["../src/get-chevron-rotation.ts"],"sourcesContent":["interface Options {\n dir: 'rtl' | 'ltr';\n orientation: 'horizontal' | 'vertical' | undefined;\n direction: 'next' | 'previous';\n}\n\nexport function getChevronRotation({ dir, orientation, direction }: Options) {\n if (direction === 'previous') {\n return orientation === 'horizontal' ? 90 * (dir === 'ltr' ? 1 : -1) : -180;\n }\n\n return orientation === 'horizontal' ? 90 * (dir === 'ltr' ? -1 : 1) : 0;\n}\n"],"mappings":";;AAMA,SAAgB,mBAAmB,EAAE,KAAK,aAAa,aAAsB;CAC3E,IAAI,cAAc,YAChB,OAAO,gBAAgB,eAAe,MAAM,QAAQ,QAAQ,IAAI,MAAM;CAGxE,OAAO,gBAAgB,eAAe,MAAM,QAAQ,QAAQ,KAAK,KAAK;AACxE"}