UNPKG

react-native-col

Version:
24 lines 620 B
export function createDialStyle(flexDirection, dial) { const justifyContent = flexDirection === 'row' ? dialX(dial) : dialY(dial); const alignItems = flexDirection === 'row' ? dialY(dial) : dialX(dial); return { flexDirection, justifyContent, alignItems, }; } function dialX(dial) { if (dial % 3 === 0) return 'flex-end'; if (dial % 3 === 2) return 'center'; return 'flex-start'; } function dialY(dial) { if (dial > 6) return 'flex-end'; if (dial > 3) return 'center'; return 'flex-start'; } //# sourceMappingURL=dial.js.map