@sydsoft/base 1.14.0 → 1.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,4 +9,8 @@ global.css içinde .sbox, .sbox_header ve .sbox_footer ile müdahale edilebilir.
9
9
  .sInputComponent, .adornment_start, .adornment_end, .label, input, select, textarea
10
10
 
11
11
  # Icons
12
- <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"/> ekle
12
+ <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"/> ekle
13
+
14
+
15
+ # Grid
16
+ <DevelopGridComponent>
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const DevelopGridComponent: React.FC;
3
+ export default DevelopGridComponent;
@@ -0,0 +1,39 @@
1
+ import { jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { useState } from 'react';
3
+ var DevelopGridComponent = function () {
4
+ var _a = useState(''), currentBreakpoint = _a[0], setCurrentBreakpoint = _a[1];
5
+ // Breakpoint detector
6
+ React.useEffect(function () {
7
+ var updateBreakpoint = function () {
8
+ var width = window.innerWidth;
9
+ var breakpoint = '';
10
+ if (width <= 576)
11
+ breakpoint = 'XS (≤576px)';
12
+ else if (width <= 768)
13
+ breakpoint = 'SM (577-768px)';
14
+ else if (width <= 992)
15
+ breakpoint = 'MD (769-992px)';
16
+ else if (width <= 1200)
17
+ breakpoint = 'LG (993-1200px)';
18
+ else if (width <= 1400)
19
+ breakpoint = 'XL (1201-1400px)';
20
+ else
21
+ breakpoint = 'XXL (≥1401px)';
22
+ setCurrentBreakpoint(breakpoint);
23
+ };
24
+ updateBreakpoint();
25
+ window.addEventListener('resize', updateBreakpoint);
26
+ return function () { return window.removeEventListener('resize', updateBreakpoint); };
27
+ }, []);
28
+ return (_jsxs("div", { style: {
29
+ position: 'fixed',
30
+ bottom: '10px',
31
+ right: '10px',
32
+ background: '#333',
33
+ color: 'white',
34
+ padding: '10px',
35
+ borderRadius: '4px',
36
+ zIndex: 9999999
37
+ }, children: ["Current: ", currentBreakpoint] }));
38
+ };
39
+ export default DevelopGridComponent;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sydsoft/base",
3
3
  "private": false,
4
- "version": "1.14.0",
4
+ "version": "1.15.0",
5
5
  "description": "",
6
6
  "main": "./dist/cjs/index.js",
7
7
  "module": "./dist/esm/index.js",